package com.youan.serve.dao.domain;

import com.baomidou.mybatisplus.annotation.TableName;

import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.youan.pangu.base.bean.ElementTree;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 
 * </p>
 *
 * @author auto_code
 * @since 2020-03-04
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_org")
public class Org extends ElementTree implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "org_id")
    private String orgId;

    private String orgName;

    private String parentId;

    private String leader;

    private String remark;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date operatedTime;

    private String operator;

    @Override
    public String getId() {
        return this.orgId;
    }

    @Override
    public void setId() {
        this.id = this.orgId;
    }

    @Override
    public String getLabel() {
        return this.orgName;
    }

    @Override
    public void setLabel() {
        this.label = this.orgName;
    }

}
